<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>QxOrm: C:/Dvlp/_Perso/QxOrm/include/QxConvert/QxConvert_Impl.h Source File</title>

<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>

</head>
<body>
<div id="top"><!-- do not remove this div! -->


<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  
  <td id="projectlogo"><img alt="Logo" src="logo_qxorm.png"/></td>
  
  
  <td style="padding-left: 0.5em;">
   <div id="projectname">QxOrm
   &#160;<span id="projectnumber">1.4.3</span>
   </div>
   <div id="projectbrief">C++ Object Relational Mapping library</div>
  </td>
  
  
  
 </tr>
 </tbody>
</table>
</div>

<!-- Generated by Doxygen 1.7.5.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('_qx_convert___impl_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">QxConvert_Impl.h</div>  </div>
</div>
<div class="contents">
<a href="_qx_convert___impl_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/****************************************************************************</span>
<a name="l00002"></a>00002 <span class="comment">**</span>
<a name="l00003"></a>00003 <span class="comment">** http://www.qxorm.com/</span>
<a name="l00004"></a>00004 <span class="comment">** Copyright (C) 2013 Lionel Marty (contact@qxorm.com)</span>
<a name="l00005"></a>00005 <span class="comment">**</span>
<a name="l00006"></a>00006 <span class="comment">** This file is part of the QxOrm library</span>
<a name="l00007"></a>00007 <span class="comment">**</span>
<a name="l00008"></a>00008 <span class="comment">** This software is provided &#39;as-is&#39;, without any express or implied</span>
<a name="l00009"></a>00009 <span class="comment">** warranty. In no event will the authors be held liable for any</span>
<a name="l00010"></a>00010 <span class="comment">** damages arising from the use of this software</span>
<a name="l00011"></a>00011 <span class="comment">**</span>
<a name="l00012"></a>00012 <span class="comment">** Commercial Usage</span>
<a name="l00013"></a>00013 <span class="comment">** Licensees holding valid commercial QxOrm licenses may use this file in</span>
<a name="l00014"></a>00014 <span class="comment">** accordance with the commercial license agreement provided with the</span>
<a name="l00015"></a>00015 <span class="comment">** Software or, alternatively, in accordance with the terms contained in</span>
<a name="l00016"></a>00016 <span class="comment">** a written agreement between you and Lionel Marty</span>
<a name="l00017"></a>00017 <span class="comment">**</span>
<a name="l00018"></a>00018 <span class="comment">** GNU General Public License Usage</span>
<a name="l00019"></a>00019 <span class="comment">** Alternatively, this file may be used under the terms of the GNU</span>
<a name="l00020"></a>00020 <span class="comment">** General Public License version 3.0 as published by the Free Software</span>
<a name="l00021"></a>00021 <span class="comment">** Foundation and appearing in the file &#39;license.gpl3.txt&#39; included in the</span>
<a name="l00022"></a>00022 <span class="comment">** packaging of this file. Please review the following information to</span>
<a name="l00023"></a>00023 <span class="comment">** ensure the GNU General Public License version 3.0 requirements will be</span>
<a name="l00024"></a>00024 <span class="comment">** met : http://www.gnu.org/copyleft/gpl.html</span>
<a name="l00025"></a>00025 <span class="comment">**</span>
<a name="l00026"></a>00026 <span class="comment">** If you are unsure which license is appropriate for your use, or</span>
<a name="l00027"></a>00027 <span class="comment">** if you have questions regarding the use of this file, please contact :</span>
<a name="l00028"></a>00028 <span class="comment">** contact@qxorm.com</span>
<a name="l00029"></a>00029 <span class="comment">**</span>
<a name="l00030"></a>00030 <span class="comment">****************************************************************************/</span>
<a name="l00031"></a>00031 
<a name="l00032"></a>00032 <span class="preprocessor">#ifndef _QX_CONVERT_IMPL_H_</span>
<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#define _QX_CONVERT_IMPL_H_</span>
<a name="l00034"></a>00034 <span class="preprocessor"></span>
<a name="l00035"></a>00035 <span class="preprocessor">#ifdef _MSC_VER</span>
<a name="l00036"></a>00036 <span class="preprocessor"></span><span class="preprocessor">#pragma once</span>
<a name="l00037"></a>00037 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
<a name="l00038"></a>00038 <span class="preprocessor"></span>
<a name="l00039"></a>00039 <span class="preprocessor">#include &lt;boost/mpl/if.hpp&gt;</span>
<a name="l00040"></a>00040 <span class="preprocessor">#include &lt;boost/mpl/logical.hpp&gt;</span>
<a name="l00041"></a>00041 <span class="preprocessor">#include &lt;boost/type_traits/is_pointer.hpp&gt;</span>
<a name="l00042"></a>00042 <span class="preprocessor">#include &lt;boost/type_traits/is_enum.hpp&gt;</span>
<a name="l00043"></a>00043 <span class="preprocessor">#include &lt;boost/static_assert.hpp&gt;</span>
<a name="l00044"></a>00044 
<a name="l00045"></a>00045 <span class="preprocessor">#include &lt;<a class="code" href="_qx_convert_8h.html" title="qx::cvt : namespace to provide global functions to convert any kind of objects to/from QString and QV...">QxConvert/QxConvert.h</a>&gt;</span>
<a name="l00046"></a>00046 <span class="preprocessor">#include &lt;<a class="code" href="_qx_bool_8h.html" title="qx_bool : QxOrm library boolean type with code and description message when an error occured...">QxCommon/QxBool.h</a>&gt;</span>
<a name="l00047"></a>00047 
<a name="l00048"></a>00048 <span class="preprocessor">#include &lt;<a class="code" href="_qx_date_neutral_8h.html" title="Helper class to store a date value into database under neutral format (YYYYMMDD) =&gt; cross database co...">QxDao/QxDateNeutral.h</a>&gt;</span>
<a name="l00049"></a>00049 <span class="preprocessor">#include &lt;<a class="code" href="_qx_time_neutral_8h.html" title="Helper class to store a time value into database under neutral format (HHMMSS) =&gt; cross database comp...">QxDao/QxTimeNeutral.h</a>&gt;</span>
<a name="l00050"></a>00050 <span class="preprocessor">#include &lt;<a class="code" href="_qx_date_time_neutral_8h.html" title="Helper class to store a date-time value into database under neutral format (YYYYMMDDHHMMSS) =&gt; cross ...">QxDao/QxDateTimeNeutral.h</a>&gt;</span>
<a name="l00051"></a>00051 <span class="preprocessor">#include &lt;<a class="code" href="_qx_sql_query_8h.html" title="Define a user SQL query added to default SQL query builded by QxOrm library, and used by qx::dao::xxx...">QxDao/QxSqlQuery.h</a>&gt;</span>
<a name="l00052"></a>00052 
<a name="l00053"></a>00053 <span class="preprocessor">#include &lt;<a class="code" href="_qx_collection_8h.html" title="QxOrm container (keep insertion order + quick access by index + quick access by key)">QxCollection/QxCollection.h</a>&gt;</span>
<a name="l00054"></a>00054 
<a name="l00055"></a>00055 <span class="preprocessor">#include &lt;<a class="code" href="_qx_class_8h.html" title="Concrete class registered into QxOrm context.">QxRegister/QxClass.h</a>&gt;</span>
<a name="l00056"></a>00056 
<a name="l00057"></a>00057 <span class="preprocessor">#include &lt;<a class="code" href="_qx_archive_8h.html" title="Provide some tools to serialize a class registered into QxOrm context into/from binary/XML archive (f...">QxSerialize/QxArchive.h</a>&gt;</span>
<a name="l00058"></a>00058 <span class="preprocessor">#include &lt;<a class="code" href="_qx_serialize_q_data_stream_8h.html" title="Used when _QX_ENABLE_BOOST_SERIALIZATION compilation option is not defined to provide serialization e...">QxSerialize/QxSerializeQDataStream.h</a>&gt;</span>
<a name="l00059"></a>00059 <span class="preprocessor">#include &lt;<a class="code" href="_qx_serialize_q_data_stream__all__include_8h.html" title="Include all Qt QDataStream serialization method (save/load) provided by QxOrm library.">QxSerialize/QDataStream/QxSerializeQDataStream_all_include.h</a>&gt;</span>
<a name="l00060"></a>00060 <span class="preprocessor">#include &lt;<a class="code" href="_qx_serialize_q_json__qx__registered__class_8h.html" title="Provide a generic Qt QJson serialization method (save/load) for classes registered into QxOrm context...">QxSerialize/QJson/QxSerializeQJson_qx_registered_class.h</a>&gt;</span>
<a name="l00061"></a>00061 
<a name="l00062"></a>00062 <span class="preprocessor">#include &lt;<a class="code" href="_qx_invalid_value_8h.html" title="Invalid value when a property fails to pass a constraint.">QxValidator/QxInvalidValue.h</a>&gt;</span>
<a name="l00063"></a>00063 <span class="preprocessor">#include &lt;<a class="code" href="_qx_invalid_value_x_8h.html" title="List of invalid values.">QxValidator/QxInvalidValueX.h</a>&gt;</span>
<a name="l00064"></a>00064 
<a name="l00065"></a>00065 <span class="preprocessor">#include &lt;<a class="code" href="is__smart__ptr_8h.html" title="qx::trait::is_smart_ptr&lt;T&gt;::value : return true if T is a smart-pointer of boost, Qt or QxOrm librari...">QxTraits/is_smart_ptr.h</a>&gt;</span>
<a name="l00066"></a>00066 <span class="preprocessor">#include &lt;<a class="code" href="is__container_8h.html" title="qx::trait::is_container&lt;T&gt;::value : return true if T is a container from stl, boost, Qt or QxOrm library, otherwise return false">QxTraits/is_container.h</a>&gt;</span>
<a name="l00067"></a>00067 <span class="preprocessor">#include &lt;<a class="code" href="is__qx__registered_8h.html" title="qx::trait::is_qx_registered&lt;T&gt;::value : return true if T is registered into QxOrm context to provide ...">QxTraits/is_qx_registered.h</a>&gt;</span>
<a name="l00068"></a>00068 <span class="preprocessor">#include &lt;<a class="code" href="is__qt__variant__compatible_8h.html" title="qx::trait::is_qt_variant_compatible&lt;T&gt;::value : return true if T can be host into a QVariant object o...">QxTraits/is_qt_variant_compatible.h</a>&gt;</span>
<a name="l00069"></a>00069 <span class="preprocessor">#include &lt;<a class="code" href="get__class__name__primitive_8h.html" title="Register all primitive and useful types of stl, boost and Qt libraries using QX_REGISTER_CLASS_NAME(T...">QxTraits/get_class_name_primitive.h</a>&gt;</span>
<a name="l00070"></a>00070 <span class="preprocessor">#include &lt;<a class="code" href="construct__ptr_8h.html" title="qx::trait::construct_ptr&lt;T&gt;::get(T &amp; t) : instantiate a new pointer, support both nude-pointer and sm...">QxTraits/construct_ptr.h</a>&gt;</span>
<a name="l00071"></a>00071 <span class="preprocessor">#include &lt;<a class="code" href="generic__container_8h.html" title="qx::trait::generic_container&lt;T&gt; : provide some tools to manage all containers without knowing its typ...">QxTraits/generic_container.h</a>&gt;</span>
<a name="l00072"></a>00072 
<a name="l00073"></a><a class="code" href="_qx_convert___impl_8h.html#a41e031d2910e17bd32225e5322181ff3">00073</a> <span class="preprocessor">#define QX_STR_CVT_QDATE_FORMAT        &quot;yyyyMMdd&quot;</span>
<a name="l00074"></a><a class="code" href="_qx_convert___impl_8h.html#a95635d04466048253b2e51958bd96041">00074</a> <span class="preprocessor"></span><span class="preprocessor">#define QX_STR_CVT_QTIME_FORMAT        &quot;hhmmsszzz&quot;</span>
<a name="l00075"></a><a class="code" href="_qx_convert___impl_8h.html#afdee44b7dafb0964ee57b7312a00084e">00075</a> <span class="preprocessor"></span><span class="preprocessor">#define QX_STR_CVT_QDATETIME_FORMAT    &quot;yyyyMMddhhmmsszzz&quot;</span>
<a name="l00076"></a>00076 <span class="preprocessor"></span>
<a name="l00077"></a>00077 <span class="preprocessor">#ifdef _QX_ENABLE_BOOST_SERIALIZATION</span>
<a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor">#if _QX_SERIALIZE_POLYMORPHIC</span>
<a name="l00079"></a><a class="code" href="_qx_convert___impl_8h.html#abd81dce59020e77c6fe1af8fe11eb6ce">00079</a> <span class="preprocessor"></span><span class="preprocessor">#define QX_CVT_DEFAULT_ARCHIVE         qx::serialization::polymorphic_xml</span>
<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">#elif _QX_SERIALIZE_XML</span>
<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">#define QX_CVT_DEFAULT_ARCHIVE         qx::serialization::xml</span>
<a name="l00082"></a>00082 <span class="preprocessor"></span><span class="preprocessor">#elif _QX_SERIALIZE_TEXT</span>
<a name="l00083"></a>00083 <span class="preprocessor"></span><span class="preprocessor">#define QX_CVT_DEFAULT_ARCHIVE         qx::serialization::text</span>
<a name="l00084"></a>00084 <span class="preprocessor"></span><span class="preprocessor">#elif _QX_SERIALIZE_BINARY</span>
<a name="l00085"></a>00085 <span class="preprocessor"></span><span class="preprocessor">#define QX_CVT_DEFAULT_ARCHIVE         qx::serialization::binary</span>
<a name="l00086"></a>00086 <span class="preprocessor"></span><span class="preprocessor">#endif // _QX_SERIALIZE_XML</span>
<a name="l00087"></a>00087 <span class="preprocessor"></span><span class="preprocessor">#else // _QX_ENABLE_BOOST_SERIALIZATION</span>
<a name="l00088"></a>00088 <span class="preprocessor"></span><span class="preprocessor">#define QX_CVT_DEFAULT_ARCHIVE         qx::serialization::qt</span>
<a name="l00089"></a>00089 <span class="preprocessor"></span><span class="preprocessor">#endif // _QX_ENABLE_BOOST_SERIALIZATION</span>
<a name="l00090"></a>00090 <span class="preprocessor"></span>
<a name="l00091"></a><a class="code" href="_qx_convert___impl_8h.html#a8b36d5271d4c4aecd8b1eec1aef36726">00091</a> <span class="preprocessor">#define QX_CVT_USING_ARCHIVE_IMPL(className) \</span>
<a name="l00092"></a>00092 <span class="preprocessor">namespace qx { namespace cvt { namespace detail { \</span>
<a name="l00093"></a>00093 <span class="preprocessor">template &lt;&gt; struct QxConvert_ToString&lt; className &gt; { \</span>
<a name="l00094"></a>00094 <span class="preprocessor">static inline QString toString(const className &amp; t, const QString &amp; format, int index, qx::cvt::context::ctx_type ctx) \</span>
<a name="l00095"></a>00095 <span class="preprocessor">{ Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } }; \</span>
<a name="l00096"></a>00096 <span class="preprocessor">template &lt;&gt; struct QxConvert_FromString&lt; className &gt; { \</span>
<a name="l00097"></a>00097 <span class="preprocessor">static inline qx_bool fromString(const QString &amp; s, className &amp; t, const QString &amp; format, int index, qx::cvt::context::ctx_type ctx) \</span>
<a name="l00098"></a>00098 <span class="preprocessor">{ Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::from_string(t, s); } }; \</span>
<a name="l00099"></a>00099 <span class="preprocessor">template &lt;&gt; struct QxConvert_ToVariant&lt; className &gt; { \</span>
<a name="l00100"></a>00100 <span class="preprocessor">static inline QVariant toVariant(const className &amp; t, const QString &amp; format, int index, qx::cvt::context::ctx_type ctx) \</span>
<a name="l00101"></a>00101 <span class="preprocessor">{ Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); return QX_CVT_DEFAULT_ARCHIVE::to_string(t); } }; \</span>
<a name="l00102"></a>00102 <span class="preprocessor">template &lt;&gt; struct QxConvert_FromVariant&lt; className &gt; { \</span>
<a name="l00103"></a>00103 <span class="preprocessor">static inline qx_bool fromVariant(const QVariant &amp; v, className &amp; t, const QString &amp; format, int index, qx::cvt::context::ctx_type ctx) \</span>
<a name="l00104"></a>00104 <span class="preprocessor">{ Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); QString s = v.toString(); return QX_CVT_DEFAULT_ARCHIVE::from_string(t, s); } }; \</span>
<a name="l00105"></a>00105 <span class="preprocessor">} } } // namespace qx::cvt::detail</span>
<a name="l00106"></a>00106 <span class="preprocessor"></span>
<a name="l00107"></a>00107 <span class="keyword">namespace </span>qx {
<a name="l00108"></a>00108 <span class="keyword">namespace </span>cvt {
<a name="l00109"></a>00109 <span class="keyword">namespace </span>detail {
<a name="l00110"></a><a class="code" href="namespaceqx_1_1cvt_1_1detail_1_1helper.html">00110</a> <span class="keyword">namespace </span>helper {
<a name="l00111"></a>00111 
<a name="l00112"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1helper_1_1_qx_convert_helper___generic.html">00112</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1helper_1_1_qx_convert_helper___generic.html">QxConvertHelper_Generic</a> { };
<a name="l00113"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1helper_1_1_qx_convert_helper___ptr.html">00113</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1helper_1_1_qx_convert_helper___ptr.html">QxConvertHelper_Ptr</a> { };
<a name="l00114"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1helper_1_1_qx_convert_helper___registered.html">00114</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1helper_1_1_qx_convert_helper___registered.html">QxConvertHelper_Registered</a> { };
<a name="l00115"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1helper_1_1_qx_convert_helper___container.html">00115</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1helper_1_1_qx_convert_helper___container.html">QxConvertHelper_Container</a> { };
<a name="l00116"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1helper_1_1_qx_convert_helper___enum.html">00116</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1helper_1_1_qx_convert_helper___enum.html">QxConvertHelper_Enum</a> { };
<a name="l00117"></a>00117 
<a name="l00118"></a><a class="code" href="namespaceqx_1_1cvt_1_1detail_1_1helper.html#ad947860a34e5171d82dad3a478d9a06b">00118</a> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="namespaceqx_1_1cvt_1_1detail_1_1helper.html#ad947860a34e5171d82dad3a478d9a06b">checkConvertQVariantToString</a>(<span class="keyword">const</span> QVariant &amp; v) { <span class="keywordflow">return</span> ((v.type() == QVariant::List) || (v.type() == QVariant::Map) || (v.type() == QVariant::Hash) || (v.type() == QVariant::StringList)); }
<a name="l00119"></a>00119 
<a name="l00120"></a>00120 } <span class="comment">// namespace helper</span>
<a name="l00121"></a>00121 
<a name="l00122"></a>00122 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keyword">typename</span> H&gt;
<a name="l00123"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string.html">00123</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string.html">QxConvertHelper_ToString</a>
<a name="l00124"></a>00124 {
<a name="l00125"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string.html#a25fde6b8f399afc71c04f25a191a243b">00125</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QString <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string.html#a25fde6b8f399afc71c04f25a191a243b">toString</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00126"></a>00126    { <a class="code" href="_qx_macro_8h.html#a33fe0d2efbd7dfd7cf14d6e22926c61d">qAssertMsg</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;qx::cvt::detail::QxConvertHelper_ToString&quot;</span>, <span class="stringliteral">&quot;template must be specialized&quot;</span>); Q_UNUSED(t); Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); <span class="keywordflow">return</span> QString(); }
<a name="l00127"></a>00127 };
<a name="l00128"></a>00128 
<a name="l00129"></a>00129 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keyword">typename</span> H&gt;
<a name="l00130"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string.html">00130</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string.html">QxConvertHelper_FromString</a>
<a name="l00131"></a>00131 {
<a name="l00132"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string.html#aaf28fa5f1137a41ddf42f39d936ca006">00132</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string.html#aaf28fa5f1137a41ddf42f39d936ca006">fromString</a>(<span class="keyword">const</span> QString &amp; s, T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00133"></a>00133    { <a class="code" href="_qx_macro_8h.html#a33fe0d2efbd7dfd7cf14d6e22926c61d">qAssertMsg</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;qx::cvt::detail::QxConvertHelper_FromString&quot;</span>, <span class="stringliteral">&quot;template must be specialized&quot;</span>); Q_UNUSED(s); Q_UNUSED(t); Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); <span class="keywordflow">return</span> <a class="code" href="_qx_bool_8h.html#a40069a4245b458585997dadea3a86b33">qx_bool</a>(); }
<a name="l00134"></a>00134 };
<a name="l00135"></a>00135 
<a name="l00136"></a>00136 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keyword">typename</span> H&gt;
<a name="l00137"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant.html">00137</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant.html">QxConvertHelper_ToVariant</a>
<a name="l00138"></a>00138 {
<a name="l00139"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant.html#a971edcf918308cf3bab078f36f6096b9">00139</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QVariant <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant.html#a971edcf918308cf3bab078f36f6096b9">toVariant</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00140"></a>00140    { <a class="code" href="_qx_macro_8h.html#a33fe0d2efbd7dfd7cf14d6e22926c61d">qAssertMsg</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;qx::cvt::detail::QxConvertHelper_ToVariant&quot;</span>, <span class="stringliteral">&quot;template must be specialized&quot;</span>); Q_UNUSED(t); Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); <span class="keywordflow">return</span> QVariant(); }
<a name="l00141"></a>00141 };
<a name="l00142"></a>00142 
<a name="l00143"></a>00143 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keyword">typename</span> H&gt;
<a name="l00144"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant.html">00144</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant.html">QxConvertHelper_FromVariant</a>
<a name="l00145"></a>00145 {
<a name="l00146"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant.html#aace1cc67984f43c4893b7bf4f4ac850d">00146</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant.html#aace1cc67984f43c4893b7bf4f4ac850d">fromVariant</a>(<span class="keyword">const</span> QVariant &amp; v, T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00147"></a>00147    { <a class="code" href="_qx_macro_8h.html#a33fe0d2efbd7dfd7cf14d6e22926c61d">qAssertMsg</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;qx::cvt::detail::QxConvertHelper_FromVariant&quot;</span>, <span class="stringliteral">&quot;template must be specialized&quot;</span>); Q_UNUSED(v); Q_UNUSED(t); Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); <span class="keywordflow">return</span> <a class="code" href="_qx_bool_8h.html#a40069a4245b458585997dadea3a86b33">qx_bool</a>(); }
<a name="l00148"></a>00148 };
<a name="l00149"></a>00149 
<a name="l00150"></a>00150 <span class="preprocessor">#ifndef _QX_NO_JSON</span>
<a name="l00151"></a>00151 <span class="preprocessor"></span>
<a name="l00152"></a>00152 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keyword">typename</span> H&gt;
<a name="l00153"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json.html">00153</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json.html">QxConvertHelper_ToJson</a>
<a name="l00154"></a>00154 {
<a name="l00155"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json.html#a60b3ad86395d7816fba5975e37ae321f">00155</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QJsonValue <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json.html#a60b3ad86395d7816fba5975e37ae321f">toJson</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format)
<a name="l00156"></a>00156    { <a class="code" href="_qx_macro_8h.html#a33fe0d2efbd7dfd7cf14d6e22926c61d">qAssertMsg</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;qx::cvt::detail::QxConvertHelper_ToJson&quot;</span>, <span class="stringliteral">&quot;template must be specialized&quot;</span>); Q_UNUSED(t); Q_UNUSED(format); <span class="keywordflow">return</span> QJsonValue(); }
<a name="l00157"></a>00157 };
<a name="l00158"></a>00158 
<a name="l00159"></a>00159 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, <span class="keyword">typename</span> H&gt;
<a name="l00160"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json.html">00160</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json.html">QxConvertHelper_FromJson</a>
<a name="l00161"></a>00161 {
<a name="l00162"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json.html#af9120e24ca37ae8e44a0fae6fd0e1c6a">00162</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json.html#af9120e24ca37ae8e44a0fae6fd0e1c6a">fromJson</a>(<span class="keyword">const</span> QJsonValue &amp; j, T &amp; t, <span class="keyword">const</span> QString &amp; format)
<a name="l00163"></a>00163    { <a class="code" href="_qx_macro_8h.html#a33fe0d2efbd7dfd7cf14d6e22926c61d">qAssertMsg</a>(<span class="keyword">false</span>, <span class="stringliteral">&quot;qx::cvt::detail::QxConvertHelper_FromJson&quot;</span>, <span class="stringliteral">&quot;template must be specialized&quot;</span>); Q_UNUSED(j); Q_UNUSED(t); Q_UNUSED(format); <span class="keywordflow">return</span> <a class="code" href="_qx_bool_8h.html#a40069a4245b458585997dadea3a86b33">qx_bool</a>(); }
<a name="l00164"></a>00164 };
<a name="l00165"></a>00165 
<a name="l00166"></a>00166 <span class="preprocessor">#endif // _QX_NO_JSON</span>
<a name="l00167"></a>00167 <span class="preprocessor"></span>
<a name="l00168"></a>00168 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00169"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_1h7cb7a90bffb8ff0248094838588ab0f2.html">00169</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string.html">QxConvertHelper_ToString</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Generic&gt;
<a name="l00170"></a>00170 {
<a name="l00171"></a>00171 
<a name="l00172"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_1h7cb7a90bffb8ff0248094838588ab0f2.html#a97998c9d9cab82393fac11090c8288eca29d57558b39cf29165c1dff89b649a57">00172</a>    <span class="keyword">enum</span> { qx_need_to_specialize_template_convert_to_string_from_string = 0 };
<a name="l00173"></a>00173 
<a name="l00174"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_1h7cb7a90bffb8ff0248094838588ab0f2.html#a44caa2e9d9d06d66983d6864bc179ab8">00174</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QString <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string.html#a25fde6b8f399afc71c04f25a191a243b">toString</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00175"></a>00175    {
<a name="l00176"></a>00176       Q_UNUSED(t); Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx);
<a name="l00177"></a>00177       BOOST_STATIC_ASSERT(qx_need_to_specialize_template_convert_to_string_from_string); <span class="comment">// If a compilation error occurred here : you have to specialize template &#39;qx::cvt::detail::QxConvert_ToString&lt; MyType &gt;&#39;</span>
<a name="l00178"></a>00178       <span class="keywordflow">return</span> QString();
<a name="l00179"></a>00179 
<a name="l00180"></a>00180       <span class="comment">/*</span>
<a name="l00181"></a>00181 <span class="comment">      std::string s;</span>
<a name="l00182"></a>00182 <span class="comment">      try { s = boost::lexical_cast&lt;std::string&gt;(t); }</span>
<a name="l00183"></a>00183 <span class="comment">      catch (...) { qDebug(&quot;[QxOrm] %s&quot;, &quot;&#39;QxConvertHelper_ToString::toString()&#39; unknown error calling &#39;boost::lexical_cast&lt;std::string&gt;()&#39;&quot;); s = &quot;&quot;; }</span>
<a name="l00184"></a>00184 <span class="comment">#ifndef QT_NO_STL</span>
<a name="l00185"></a>00185 <span class="comment">      return QString::fromStdString(s);</span>
<a name="l00186"></a>00186 <span class="comment">#else // QT_NO_STL</span>
<a name="l00187"></a>00187 <span class="comment">      return QString::fromLatin1(s.data(), int(s.size()));</span>
<a name="l00188"></a>00188 <span class="comment">#endif // QT_NO_STL</span>
<a name="l00189"></a>00189 <span class="comment">      */</span>
<a name="l00190"></a>00190    }
<a name="l00191"></a>00191 
<a name="l00192"></a>00192 };
<a name="l00193"></a>00193 
<a name="l00194"></a>00194 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00195"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_fbc35274c126016ef1bfc29f767054a6.html">00195</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string.html">QxConvertHelper_FromString</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Generic&gt;
<a name="l00196"></a>00196 {
<a name="l00197"></a>00197 
<a name="l00198"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_fbc35274c126016ef1bfc29f767054a6.html#a5a2b54b32fa46077fb98cf7c338c14dda3ff2c5f2cc38a78d57727b01ba28106e">00198</a>    <span class="keyword">enum</span> { qx_need_to_specialize_template_convert_to_string_from_string = 0 };
<a name="l00199"></a>00199 
<a name="l00200"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_fbc35274c126016ef1bfc29f767054a6.html#afd4469221f493bc4a1139eff9b144322">00200</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string.html#aaf28fa5f1137a41ddf42f39d936ca006">fromString</a>(<span class="keyword">const</span> QString &amp; s, T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00201"></a>00201    {
<a name="l00202"></a>00202       Q_UNUSED(s); Q_UNUSED(t); Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx);
<a name="l00203"></a>00203       BOOST_STATIC_ASSERT(qx_need_to_specialize_template_convert_to_string_from_string); <span class="comment">// If a compilation error occurred here : you have to specialize template &#39;qx::cvt::detail::QxConvert_FromString&lt; MyType &gt;&#39;</span>
<a name="l00204"></a>00204       <span class="keywordflow">return</span> <a class="code" href="_qx_bool_8h.html#a40069a4245b458585997dadea3a86b33">qx_bool</a>(<span class="keyword">true</span>);
<a name="l00205"></a>00205 
<a name="l00206"></a>00206       <span class="comment">/*</span>
<a name="l00207"></a>00207 <span class="comment">#ifndef QT_NO_STL</span>
<a name="l00208"></a>00208 <span class="comment">      try { t = boost::lexical_cast&lt;T&gt;(s.toStdString()); }</span>
<a name="l00209"></a>00209 <span class="comment">#else // QT_NO_STL</span>
<a name="l00210"></a>00210 <span class="comment">      try { std::string tmp(s.toLatin1().constData()); t = boost::lexical_cast&lt;T&gt;(tmp); }</span>
<a name="l00211"></a>00211 <span class="comment">#endif // QT_NO_STL</span>
<a name="l00212"></a>00212 <span class="comment">      catch (...) { qDebug(&quot;[QxOrm] %s&quot;, &quot;&#39;QxConvertHelper_FromString::fromString()&#39; unknown error calling &#39;boost::lexical_cast&lt;T&gt;()&#39;&quot;); return qx_bool(false); }</span>
<a name="l00213"></a>00213 <span class="comment">      return qx_bool(true);</span>
<a name="l00214"></a>00214 <span class="comment">      */</span>
<a name="l00215"></a>00215    }
<a name="l00216"></a>00216 
<a name="l00217"></a>00217 };
<a name="l00218"></a>00218 
<a name="l00219"></a>00219 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00220"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1_108fef6e317ff47ac0c835bf8ffde759d.html">00220</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant.html">QxConvertHelper_ToVariant</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Generic&gt;
<a name="l00221"></a>00221 {
<a name="l00222"></a>00222 
<a name="l00223"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1_108fef6e317ff47ac0c835bf8ffde759d.html#a11c6aa4ea6be1bb3c2fda5097b37a7c1">00223</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QVariant <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant.html#a971edcf918308cf3bab078f36f6096b9">toVariant</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00224"></a>00224    { <span class="keywordflow">return</span> cvtQVariant&lt;qx::trait::is_qt_variant_compatible&lt;T&gt;::value, 0&gt;<a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant.html#a971edcf918308cf3bab078f36f6096b9">::toVariant</a>(t, format, index, ctx); }
<a name="l00225"></a>00225 
<a name="l00226"></a>00226 <span class="keyword">private</span>:
<a name="l00227"></a>00227 
<a name="l00228"></a>00228    <span class="keyword">template</span> &lt;<span class="keywordtype">bool</span> isQVariantCompatible <span class="comment">/* = false */</span>, <span class="keywordtype">int</span> dummy&gt;
<a name="l00229"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1_18a380eca2d48ea5f7eaa7f37151c0097.html">00229</a>    <span class="keyword">struct </span>cvtQVariant
<a name="l00230"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1_18a380eca2d48ea5f7eaa7f37151c0097.html#ad4a4141994c10136d3977a550b9c6b20">00230</a>    { <span class="keyword">static</span> <span class="keyword">inline</span> QVariant <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1_18a380eca2d48ea5f7eaa7f37151c0097.html#ad4a4141994c10136d3977a550b9c6b20">toVariant</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx) { <span class="keywordflow">return</span> <a class="code" href="namespaceqx_1_1cvt.html#a7411faf9b027f9f4cfbd8018c8df6b6e">qx::cvt::to_string</a>(t, format, index, ctx); }; };
<a name="l00231"></a>00231 
<a name="l00232"></a>00232    <span class="keyword">template</span> &lt;<span class="keywordtype">int</span> dummy&gt;
<a name="l00233"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1_18bac3227a186e905234cf6f36eed67f5.html">00233</a>    <span class="keyword">struct </span>cvtQVariant&lt;true, dummy&gt;
<a name="l00234"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1_18bac3227a186e905234cf6f36eed67f5.html#a76fc0201b53c76c438da31db9add7a3b">00234</a>    { <span class="keyword">static</span> <span class="keyword">inline</span> QVariant <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1_18bac3227a186e905234cf6f36eed67f5.html#a76fc0201b53c76c438da31db9add7a3b">toVariant</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx) { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); <span class="keywordflow">return</span> QVariant(t); }; };
<a name="l00235"></a>00235 
<a name="l00236"></a>00236 };
<a name="l00237"></a>00237 
<a name="l00238"></a>00238 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00239"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1c99f51cc9c8686c3ee6e5b6aafba09a7.html">00239</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant.html">QxConvertHelper_FromVariant</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Generic&gt;
<a name="l00240"></a>00240 {
<a name="l00241"></a>00241 
<a name="l00242"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1c99f51cc9c8686c3ee6e5b6aafba09a7.html#a080e2b578829be65c2056a34adf0dffa">00242</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant.html#aace1cc67984f43c4893b7bf4f4ac850d">fromVariant</a>(<span class="keyword">const</span> QVariant &amp; v, T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00243"></a>00243    { <span class="keywordflow">return</span> cvtQVariant&lt;qx::trait::is_qt_variant_compatible&lt;T&gt;::value, 0&gt;<a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant.html#aace1cc67984f43c4893b7bf4f4ac850d">::fromVariant</a>(v, t, format, index, ctx); }
<a name="l00244"></a>00244 
<a name="l00245"></a>00245 <span class="keyword">private</span>:
<a name="l00246"></a>00246 
<a name="l00247"></a>00247    <span class="keyword">template</span> &lt;<span class="keywordtype">bool</span> isQVariantCompatible <span class="comment">/* = false */</span>, <span class="keywordtype">int</span> dummy&gt;
<a name="l00248"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant_3_01_t_00_01qx_1_1cvt_1_1detail_184d3dcb155b94a0192ae6f59d9d3ff4e.html">00248</a>    <span class="keyword">struct </span>cvtQVariant
<a name="l00249"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant_3_01_t_00_01qx_1_1cvt_1_1detail_184d3dcb155b94a0192ae6f59d9d3ff4e.html#afd0250c676373735e024ae881f5cbc9d">00249</a>    { <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant_3_01_t_00_01qx_1_1cvt_1_1detail_184d3dcb155b94a0192ae6f59d9d3ff4e.html#afd0250c676373735e024ae881f5cbc9d">fromVariant</a>(<span class="keyword">const</span> QVariant &amp; v, T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx) { <span class="keywordflow">return</span> <a class="code" href="namespaceqx_1_1cvt.html#ab4e6842789bd5c746dd1ec0db4d6a7cf">qx::cvt::from_string</a>(v.toString(), t, format, index, ctx); }; };
<a name="l00250"></a>00250 
<a name="l00251"></a>00251    <span class="keyword">template</span> &lt;<span class="keywordtype">int</span> dummy&gt;
<a name="l00252"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant_3_01_t_00_01qx_1_1cvt_1_1detail_17af68d783df288cd9368caed317cbc2c.html">00252</a>    <span class="keyword">struct </span>cvtQVariant&lt;true, dummy&gt;
<a name="l00253"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant_3_01_t_00_01qx_1_1cvt_1_1detail_17af68d783df288cd9368caed317cbc2c.html#a0497c96ec26002f86cf43fbe83519b69">00253</a>    { <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant_3_01_t_00_01qx_1_1cvt_1_1detail_17af68d783df288cd9368caed317cbc2c.html#a0497c96ec26002f86cf43fbe83519b69">fromVariant</a>(<span class="keyword">const</span> QVariant &amp; v, T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx) { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); t = v.value&lt;T&gt;(); <span class="keywordflow">return</span> <a class="code" href="_qx_bool_8h.html#a40069a4245b458585997dadea3a86b33">qx_bool</a>(<span class="keyword">true</span>); }; };
<a name="l00254"></a>00254 
<a name="l00255"></a>00255 };
<a name="l00256"></a>00256 
<a name="l00257"></a>00257 <span class="preprocessor">#ifndef _QX_NO_JSON</span>
<a name="l00258"></a>00258 <span class="preprocessor"></span>
<a name="l00259"></a>00259 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00260"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1helaee3b68bec56417f532ec03b8648641f.html">00260</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json.html">QxConvertHelper_ToJson</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Generic&gt;
<a name="l00261"></a>00261 {
<a name="l00262"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1helaee3b68bec56417f532ec03b8648641f.html#a899f7e51c04a703931905226e0dec7b2">00262</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QJsonValue <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json.html#a60b3ad86395d7816fba5975e37ae321f">toJson</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format)
<a name="l00263"></a>00263    { <span class="keywordflow">return</span> QJsonValue::fromVariant(<a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant.html">qx::cvt::detail::QxConvertHelper_ToVariant&lt;T, qx::cvt::detail::helper::QxConvertHelper_Generic&gt;::toVariant</a>(t, format, -1, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93a1a328a4e7e110b84dbca040ca9b09844">qx::cvt::context::e_no_context</a>)); }
<a name="l00264"></a>00264 };
<a name="l00265"></a>00265 
<a name="l00266"></a>00266 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00267"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1h2aa61e79b95c63ff40633008a8cd7d8d.html">00267</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json.html">QxConvertHelper_FromJson</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Generic&gt;
<a name="l00268"></a>00268 {
<a name="l00269"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1h2aa61e79b95c63ff40633008a8cd7d8d.html#a0dc3cc5866128a67559154dd1adcaa8e">00269</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json.html#af9120e24ca37ae8e44a0fae6fd0e1c6a">fromJson</a>(<span class="keyword">const</span> QJsonValue &amp; j, T &amp; t, <span class="keyword">const</span> QString &amp; format)
<a name="l00270"></a>00270    { QVariant v = j.toVariant(); <span class="keywordflow">return</span> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant.html">qx::cvt::detail::QxConvertHelper_FromVariant&lt;T, qx::cvt::detail::helper::QxConvertHelper_Generic&gt;::fromVariant</a>(v, t, format, -1, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93a1a328a4e7e110b84dbca040ca9b09844">qx::cvt::context::e_no_context</a>); }
<a name="l00271"></a>00271 };
<a name="l00272"></a>00272 
<a name="l00273"></a>00273 <span class="preprocessor">#endif // _QX_NO_JSON</span>
<a name="l00274"></a>00274 <span class="preprocessor"></span>
<a name="l00275"></a>00275 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00276"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_1ha01909dc181a921e423c8b945395422b.html">00276</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string.html">QxConvertHelper_ToString</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Ptr&gt;
<a name="l00277"></a>00277 {
<a name="l00278"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_1ha01909dc181a921e423c8b945395422b.html#a10b34bbd78e073a399a0e0f7d25c8683">00278</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QString <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string.html#a25fde6b8f399afc71c04f25a191a243b">toString</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00279"></a>00279    { <span class="keywordflow">return</span> (t ? <a class="code" href="namespaceqx_1_1cvt.html#a7411faf9b027f9f4cfbd8018c8df6b6e">qx::cvt::to_string</a>((* t), format, index, ctx) : <span class="stringliteral">&quot;&quot;</span>); }
<a name="l00280"></a>00280 };
<a name="l00281"></a>00281 
<a name="l00282"></a>00282 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00283"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_6ff83b8ce6ec9c7b7c880b0fa2054391.html">00283</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string.html">QxConvertHelper_FromString</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Ptr&gt;
<a name="l00284"></a>00284 {
<a name="l00285"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_6ff83b8ce6ec9c7b7c880b0fa2054391.html#a1d36d73f61f4166116445b42722d1456">00285</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string.html#aaf28fa5f1137a41ddf42f39d936ca006">fromString</a>(<span class="keyword">const</span> QString &amp; s, T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00286"></a>00286    { <span class="keywordflow">if</span> (! t) { <a class="code" href="group___qx_cache.html#gaf467221c40ed6d8960109a8a00c3e3fa" title="Return the object of type T associated with key sKey, or return default instance of T() if the key do...">qx::trait::construct_ptr&lt;T&gt;::get</a>(t); }; <span class="keywordflow">return</span> (t ? <a class="code" href="namespaceqx_1_1cvt.html#ab4e6842789bd5c746dd1ec0db4d6a7cf">qx::cvt::from_string</a>(s, (* t), format, index, ctx) : <a class="code" href="_qx_bool_8h.html#a40069a4245b458585997dadea3a86b33">qx_bool</a>(<span class="keyword">false</span>)); }
<a name="l00287"></a>00287 };
<a name="l00288"></a>00288 
<a name="l00289"></a>00289 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00290"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1_1203fe2f24b3c578b398bb4031ac76a89.html">00290</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant.html">QxConvertHelper_ToVariant</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Ptr&gt;
<a name="l00291"></a>00291 {
<a name="l00292"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1_1203fe2f24b3c578b398bb4031ac76a89.html#afa88cc418cd3a0777c4e6a3a06cdc908">00292</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QVariant <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant.html#a971edcf918308cf3bab078f36f6096b9">toVariant</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00293"></a>00293    { <span class="keywordflow">return</span> (t ? <a class="code" href="namespaceqx_1_1cvt.html#a54d0380e07b395f2d7d5c8eb3791f307">qx::cvt::to_variant</a>((* t), format, index, ctx) : QVariant()); }
<a name="l00294"></a>00294 };
<a name="l00295"></a>00295 
<a name="l00296"></a>00296 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00297"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1266f27b3d0435d32f97f798223dc07ac.html">00297</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant.html">QxConvertHelper_FromVariant</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Ptr&gt;
<a name="l00298"></a>00298 {
<a name="l00299"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1266f27b3d0435d32f97f798223dc07ac.html#af9359d94a5db2ef422db38dff1ce765a">00299</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant.html#aace1cc67984f43c4893b7bf4f4ac850d">fromVariant</a>(<span class="keyword">const</span> QVariant &amp; v, T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00300"></a>00300    { <span class="keywordflow">if</span> (! t &amp;&amp; ! v.isNull()) { <a class="code" href="group___qx_cache.html#gaf467221c40ed6d8960109a8a00c3e3fa" title="Return the object of type T associated with key sKey, or return default instance of T() if the key do...">qx::trait::construct_ptr&lt;T&gt;::get</a>(t); }; <span class="keywordflow">return</span> (t ? <a class="code" href="namespaceqx_1_1cvt.html#a38fbb18bd04613956f3900604f5746be">qx::cvt::from_variant</a>(v, (* t), format, index, ctx) : <a class="code" href="_qx_bool_8h.html#a40069a4245b458585997dadea3a86b33">qx_bool</a>(<span class="keyword">false</span>)); }
<a name="l00301"></a>00301 };
<a name="l00302"></a>00302 
<a name="l00303"></a>00303 <span class="preprocessor">#ifndef _QX_NO_JSON</span>
<a name="l00304"></a>00304 <span class="preprocessor"></span>
<a name="l00305"></a>00305 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00306"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1hel3f817e7cc8e2f09030634cc77cbde25e.html">00306</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json.html">QxConvertHelper_ToJson</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Ptr&gt;
<a name="l00307"></a>00307 {
<a name="l00308"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1hel3f817e7cc8e2f09030634cc77cbde25e.html#a03ef44cd33466649757c99af9294457f">00308</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QJsonValue <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json.html#a60b3ad86395d7816fba5975e37ae321f">toJson</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format)
<a name="l00309"></a>00309    { <span class="keywordflow">return</span> (t ? <a class="code" href="namespaceqx_1_1cvt.html#ae748514f1cd9c353acd494b66165393b">qx::cvt::to_json</a>((* t), format) : QJsonValue()); }
<a name="l00310"></a>00310 };
<a name="l00311"></a>00311 
<a name="l00312"></a>00312 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00313"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1h641d12cb586fe9e558d999a9fb418ccd.html">00313</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json.html">QxConvertHelper_FromJson</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Ptr&gt;
<a name="l00314"></a>00314 {
<a name="l00315"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1h641d12cb586fe9e558d999a9fb418ccd.html#aabba3bc0f1729bb0c987079e53f95da6">00315</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json.html#af9120e24ca37ae8e44a0fae6fd0e1c6a">fromJson</a>(<span class="keyword">const</span> QJsonValue &amp; j, T &amp; t, <span class="keyword">const</span> QString &amp; format)
<a name="l00316"></a>00316    { <span class="keywordflow">if</span> (! t &amp;&amp; ! j.isNull()) { <a class="code" href="group___qx_cache.html#gaf467221c40ed6d8960109a8a00c3e3fa" title="Return the object of type T associated with key sKey, or return default instance of T() if the key do...">qx::trait::construct_ptr&lt;T&gt;::get</a>(t); }; <span class="keywordflow">return</span> (t ? <a class="code" href="namespaceqx_1_1cvt.html#a7a5d0ff7b637fa9daecff2101d9c7a4f">qx::cvt::from_json</a>(j, (* t), format) : <a class="code" href="_qx_bool_8h.html#a40069a4245b458585997dadea3a86b33">qx_bool</a>(<span class="keyword">false</span>)); }
<a name="l00317"></a>00317 };
<a name="l00318"></a>00318 
<a name="l00319"></a>00319 <span class="preprocessor">#endif // _QX_NO_JSON</span>
<a name="l00320"></a>00320 <span class="preprocessor"></span>
<a name="l00321"></a>00321 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00322"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_1h7b343e82ddb0be30b4e70dfda38d8428.html">00322</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string.html">QxConvertHelper_ToString</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Registered&gt;
<a name="l00323"></a>00323 {
<a name="l00324"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_1h7b343e82ddb0be30b4e70dfda38d8428.html#a8eec75743a452bb55f04d64d14647d90">00324</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QString <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string.html#a25fde6b8f399afc71c04f25a191a243b">toString</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00325"></a>00325    {
<a name="l00326"></a>00326       <span class="keywordflow">if</span> (ctx != <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93acce1fa6ba4c5c87e4a5a459428620f6c">qx::cvt::context::e_serialize_registered</a>)
<a name="l00327"></a>00327       { <a class="code" href="classqx_1_1_ix_data_member.html" title="qx::IxDataMember : common interface for all class properties registered into QxOrm context...">qx::IxDataMember</a> * pId = <a class="code" href="classqx_1_1_qx_class.html" title="qx::QxClass&lt;T&gt; : concrete class of type T registered into QxOrm context (this class is a singleton an...">qx::QxClass&lt;T&gt;::getSingleton</a>()-&gt;<a class="code" href="classqx_1_1_ix_class.html#a668a6091e56a8133606e64cba430baa4">getDataMemberX</a>()-&gt;<a class="code" href="classqx_1_1_ix_data_member_x.html#ada28538e61c5fd9bf352abdb325be6b0">getId_WithDaoStrategy</a>(); <span class="keywordflow">return</span> (pId ? pId-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#aeb41e750a0e5ae206fe671cb94c7eb0f">toVariant</a>((&amp; t), format, index, ctx).toString() : QString()); }
<a name="l00328"></a>00328       <span class="keywordflow">return</span> qx::serialization::qt::to_string&lt;T&gt;(t);
<a name="l00329"></a>00329    }
<a name="l00330"></a>00330 };
<a name="l00331"></a>00331 
<a name="l00332"></a>00332 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00333"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_14bfab85639fcb60938048651fff9428.html">00333</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string.html">QxConvertHelper_FromString</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Registered&gt;
<a name="l00334"></a>00334 {
<a name="l00335"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_14bfab85639fcb60938048651fff9428.html#ab42a97de5758128754e14f7b69f67a8a">00335</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string.html#aaf28fa5f1137a41ddf42f39d936ca006">fromString</a>(<span class="keyword">const</span> QString &amp; s, T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00336"></a>00336    {
<a name="l00337"></a>00337       <span class="keywordflow">if</span> (ctx != <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93acce1fa6ba4c5c87e4a5a459428620f6c">qx::cvt::context::e_serialize_registered</a>)
<a name="l00338"></a>00338       { <a class="code" href="classqx_1_1_ix_data_member.html" title="qx::IxDataMember : common interface for all class properties registered into QxOrm context...">qx::IxDataMember</a> * pId = <a class="code" href="classqx_1_1_qx_class.html" title="qx::QxClass&lt;T&gt; : concrete class of type T registered into QxOrm context (this class is a singleton an...">qx::QxClass&lt;T&gt;::getSingleton</a>()-&gt;<a class="code" href="classqx_1_1_ix_class.html#a668a6091e56a8133606e64cba430baa4">getDataMemberX</a>()-&gt;<a class="code" href="classqx_1_1_ix_data_member_x.html#ada28538e61c5fd9bf352abdb325be6b0">getId_WithDaoStrategy</a>(); QVariant tmp(s); <span class="keywordflow">return</span> (pId ? pId-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#ab745b2a043797eecfe769c3f51257a35">fromVariant</a>((&amp; t), tmp, format, index, ctx) : <a class="code" href="_qx_bool_8h.html#a40069a4245b458585997dadea3a86b33">qx_bool</a>(<span class="keyword">false</span>)); }
<a name="l00339"></a>00339       <span class="keywordflow">return</span> qx::serialization::qt::from_string&lt;T&gt;(t, s);
<a name="l00340"></a>00340    }
<a name="l00341"></a>00341 };
<a name="l00342"></a>00342 
<a name="l00343"></a>00343 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00344"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1_1f65cfe36eede466347b5f54479370013.html">00344</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant.html">QxConvertHelper_ToVariant</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Registered&gt;
<a name="l00345"></a>00345 {
<a name="l00346"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1_1f65cfe36eede466347b5f54479370013.html#a2db6c0b6f52cbfaeb249c83c5027c7fb">00346</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QVariant <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant.html#a971edcf918308cf3bab078f36f6096b9">toVariant</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00347"></a>00347    {
<a name="l00348"></a>00348       <span class="keywordflow">if</span> (ctx != <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93acce1fa6ba4c5c87e4a5a459428620f6c">qx::cvt::context::e_serialize_registered</a>)
<a name="l00349"></a>00349       { <a class="code" href="classqx_1_1_ix_data_member.html" title="qx::IxDataMember : common interface for all class properties registered into QxOrm context...">qx::IxDataMember</a> * pId = <a class="code" href="classqx_1_1_qx_class.html" title="qx::QxClass&lt;T&gt; : concrete class of type T registered into QxOrm context (this class is a singleton an...">qx::QxClass&lt;T&gt;::getSingleton</a>()-&gt;<a class="code" href="classqx_1_1_ix_class.html#a668a6091e56a8133606e64cba430baa4">getDataMemberX</a>()-&gt;<a class="code" href="classqx_1_1_ix_data_member_x.html#ada28538e61c5fd9bf352abdb325be6b0">getId_WithDaoStrategy</a>(); <span class="keywordflow">return</span> (pId ? pId-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#aeb41e750a0e5ae206fe671cb94c7eb0f">toVariant</a>((&amp; t), format, index, ctx) : QVariant()); }
<a name="l00350"></a>00350       <span class="keywordflow">return</span> qx::serialization::qt::to_byte_array&lt;T&gt;(t);
<a name="l00351"></a>00351    }
<a name="l00352"></a>00352 };
<a name="l00353"></a>00353 
<a name="l00354"></a>00354 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00355"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant_3_01_t_00_01qx_1_1cvt_1_1detail_120b3cef2da5344f712a754604c31216e.html">00355</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant.html">QxConvertHelper_FromVariant</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Registered&gt;
<a name="l00356"></a>00356 {
<a name="l00357"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant_3_01_t_00_01qx_1_1cvt_1_1detail_120b3cef2da5344f712a754604c31216e.html#a68c8199974570073c1d9fab63017d6f4">00357</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant.html#aace1cc67984f43c4893b7bf4f4ac850d">fromVariant</a>(<span class="keyword">const</span> QVariant &amp; v, T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00358"></a>00358    {
<a name="l00359"></a>00359       <span class="keywordflow">if</span> (ctx != <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93acce1fa6ba4c5c87e4a5a459428620f6c">qx::cvt::context::e_serialize_registered</a>)
<a name="l00360"></a>00360       { <a class="code" href="classqx_1_1_ix_data_member.html" title="qx::IxDataMember : common interface for all class properties registered into QxOrm context...">qx::IxDataMember</a> * pId = <a class="code" href="classqx_1_1_qx_class.html" title="qx::QxClass&lt;T&gt; : concrete class of type T registered into QxOrm context (this class is a singleton an...">qx::QxClass&lt;T&gt;::getSingleton</a>()-&gt;<a class="code" href="classqx_1_1_ix_class.html#a668a6091e56a8133606e64cba430baa4">getDataMemberX</a>()-&gt;<a class="code" href="classqx_1_1_ix_data_member_x.html#ada28538e61c5fd9bf352abdb325be6b0">getId_WithDaoStrategy</a>(); <span class="keywordflow">return</span> (pId ? pId-&gt;<a class="code" href="classqx_1_1_ix_data_member.html#ab745b2a043797eecfe769c3f51257a35">fromVariant</a>((&amp; t), v, format, index, ctx) : <a class="code" href="_qx_bool_8h.html#a40069a4245b458585997dadea3a86b33">qx_bool</a>(<span class="keyword">false</span>)); }
<a name="l00361"></a>00361       <span class="keywordflow">return</span> qx::serialization::qt::from_byte_array&lt;T&gt;(t, v.toByteArray());
<a name="l00362"></a>00362    }
<a name="l00363"></a>00363 };
<a name="l00364"></a>00364 
<a name="l00365"></a>00365 <span class="preprocessor">#ifndef _QX_NO_JSON</span>
<a name="l00366"></a>00366 <span class="preprocessor"></span>
<a name="l00367"></a>00367 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00368"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1helab3c6f62066d6e49836c4d46ca502aea.html">00368</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json.html">QxConvertHelper_ToJson</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Registered&gt;
<a name="l00369"></a>00369 {
<a name="l00370"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1helab3c6f62066d6e49836c4d46ca502aea.html#a66473a87998dde5f4f32123311c55dd4">00370</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QJsonValue <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json.html#a60b3ad86395d7816fba5975e37ae321f">toJson</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format)
<a name="l00371"></a>00371    { <span class="keywordflow">return</span> <a class="code" href="group___qx_dao.html#ga100e9d635a4720ed9512799ba0ea519b" title="Insert (if no exist) or update (if already exist) an element or a list of elements into database...">qx::cvt::detail::QxSerializeJsonRegistered&lt;T&gt;::save</a>(t, format); }
<a name="l00372"></a>00372 };
<a name="l00373"></a>00373 
<a name="l00374"></a>00374 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00375"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1h0776bb6e86c30f9de53a619b1d8e2fe8.html">00375</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json.html">QxConvertHelper_FromJson</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Registered&gt;
<a name="l00376"></a>00376 {
<a name="l00377"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1h0776bb6e86c30f9de53a619b1d8e2fe8.html#aebb3f16de64168852ff7e1239131d2a0">00377</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json.html#af9120e24ca37ae8e44a0fae6fd0e1c6a">fromJson</a>(<span class="keyword">const</span> QJsonValue &amp; j, T &amp; t, <span class="keyword">const</span> QString &amp; format)
<a name="l00378"></a>00378    { <span class="keywordflow">return</span> <a class="code" href="namespaceboost_1_1serialization.html#a549b0978c269b8f9a4457d1a97ba5de3">qx::cvt::detail::QxSerializeJsonRegistered&lt;T&gt;::load</a>(j, t, format); }
<a name="l00379"></a>00379 };
<a name="l00380"></a>00380 
<a name="l00381"></a>00381 <span class="preprocessor">#endif // _QX_NO_JSON</span>
<a name="l00382"></a>00382 <span class="preprocessor"></span>
<a name="l00383"></a>00383 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00384"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_1h97baed59569cb779af1865f437771450.html">00384</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string.html">QxConvertHelper_ToString</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Container&gt;
<a name="l00385"></a>00385 {
<a name="l00386"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_1h97baed59569cb779af1865f437771450.html#ae013255931200325b12b84051053df7c">00386</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QString <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string.html#a25fde6b8f399afc71c04f25a191a243b">toString</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00387"></a>00387    { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); <span class="keywordflow">return</span> <a class="code" href="namespaceqx_1_1cvt.html#a7411faf9b027f9f4cfbd8018c8df6b6e">QX_CVT_DEFAULT_ARCHIVE::to_string</a>(t); }
<a name="l00388"></a>00388 };
<a name="l00389"></a>00389 
<a name="l00390"></a>00390 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00391"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_7106e6a079fa9b2892ee35124a30f907.html">00391</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string.html">QxConvertHelper_FromString</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Container&gt;
<a name="l00392"></a>00392 {
<a name="l00393"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_7106e6a079fa9b2892ee35124a30f907.html#a7702f6b8375d9f1110e76be575a5f59b">00393</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string.html#aaf28fa5f1137a41ddf42f39d936ca006">fromString</a>(<span class="keyword">const</span> QString &amp; s, T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00394"></a>00394    { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); <span class="keywordflow">return</span> <a class="code" href="namespaceqx_1_1cvt.html#ab4e6842789bd5c746dd1ec0db4d6a7cf">QX_CVT_DEFAULT_ARCHIVE::from_string</a>(t, s); }
<a name="l00395"></a>00395 };
<a name="l00396"></a>00396 
<a name="l00397"></a>00397 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00398"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1_18daea9da2376eec1588a9ef657423c21.html">00398</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant.html">QxConvertHelper_ToVariant</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Container&gt;
<a name="l00399"></a>00399 {
<a name="l00400"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1_18daea9da2376eec1588a9ef657423c21.html#a6fbd1d60800b9cfcf0333efc2a124d4e">00400</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QVariant <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant.html#a971edcf918308cf3bab078f36f6096b9">toVariant</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00401"></a>00401    { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); <span class="keywordflow">return</span> <a class="code" href="namespaceqx_1_1cvt.html#a7411faf9b027f9f4cfbd8018c8df6b6e">QX_CVT_DEFAULT_ARCHIVE::to_string</a>(t); }
<a name="l00402"></a>00402 };
<a name="l00403"></a>00403 
<a name="l00404"></a>00404 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00405"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1bfbeb1ca1c9ab77438dcacc85bd88d4d.html">00405</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant.html">QxConvertHelper_FromVariant</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Container&gt;
<a name="l00406"></a>00406 {
<a name="l00407"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1bfbeb1ca1c9ab77438dcacc85bd88d4d.html#a1af3f94078a709e193fa480c2e9480b5">00407</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant.html#aace1cc67984f43c4893b7bf4f4ac850d">fromVariant</a>(<span class="keyword">const</span> QVariant &amp; v, T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00408"></a>00408    { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); <span class="keywordflow">return</span> <a class="code" href="namespaceqx_1_1cvt.html#ab4e6842789bd5c746dd1ec0db4d6a7cf">QX_CVT_DEFAULT_ARCHIVE::from_string</a>(t, v.toString()); }
<a name="l00409"></a>00409 };
<a name="l00410"></a>00410 
<a name="l00411"></a>00411 <span class="preprocessor">#ifndef _QX_NO_JSON</span>
<a name="l00412"></a>00412 <span class="preprocessor"></span>
<a name="l00413"></a>00413 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00414"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1hel7f6726d2c9f8e8b51fac52e35658a4e0.html">00414</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json.html">QxConvertHelper_ToJson</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Container&gt;
<a name="l00415"></a>00415 {
<a name="l00416"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1hel7f6726d2c9f8e8b51fac52e35658a4e0.html#ada23375cbc8e0d7ffd865bcdb4efb6e5">00416</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QJsonValue <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json.html#a60b3ad86395d7816fba5975e37ae321f">toJson</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format)
<a name="l00417"></a>00417    { <span class="keywordflow">return</span> QJsonValue::fromVariant(<a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant.html">qx::cvt::detail::QxConvertHelper_ToVariant&lt;T, qx::cvt::detail::helper::QxConvertHelper_Container&gt;::toVariant</a>(t, format, -1, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93a1a328a4e7e110b84dbca040ca9b09844">qx::cvt::context::e_no_context</a>)); }
<a name="l00418"></a>00418 };
<a name="l00419"></a>00419 
<a name="l00420"></a>00420 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00421"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1hf58d93136a57ef0876338cc3f68bece7.html">00421</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json.html">QxConvertHelper_FromJson</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Container&gt;
<a name="l00422"></a>00422 {
<a name="l00423"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1hf58d93136a57ef0876338cc3f68bece7.html#a490f43eb97ba93c7b2b657768a131072">00423</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json.html#af9120e24ca37ae8e44a0fae6fd0e1c6a">fromJson</a>(<span class="keyword">const</span> QJsonValue &amp; j, T &amp; t, <span class="keyword">const</span> QString &amp; format)
<a name="l00424"></a>00424    { QVariant v = j.toVariant(); <span class="keywordflow">return</span> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant.html">qx::cvt::detail::QxConvertHelper_FromVariant&lt;T, qx::cvt::detail::helper::QxConvertHelper_Container&gt;::fromVariant</a>(v, t, format, -1, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93a1a328a4e7e110b84dbca040ca9b09844">qx::cvt::context::e_no_context</a>); }
<a name="l00425"></a>00425 };
<a name="l00426"></a>00426 
<a name="l00427"></a>00427 <span class="preprocessor">#endif // _QX_NO_JSON</span>
<a name="l00428"></a>00428 <span class="preprocessor"></span>
<a name="l00429"></a>00429 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00430"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_1ha282b1ca4451baaefaa7e902727e1f6e.html">00430</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string.html">QxConvertHelper_ToString</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Enum&gt;
<a name="l00431"></a>00431 {
<a name="l00432"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_1ha282b1ca4451baaefaa7e902727e1f6e.html#a0055f8b61069c55f8e55d7a9fcdee51e">00432</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QString <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string.html#a25fde6b8f399afc71c04f25a191a243b">toString</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00433"></a>00433    { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); <span class="keywordflow">return</span> QString::number(static_cast&lt;long&gt;(t)); }
<a name="l00434"></a>00434 };
<a name="l00435"></a>00435 
<a name="l00436"></a>00436 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00437"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_bdb5d6b2ead7178c1fcb5e2683c1dad9.html">00437</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string.html">QxConvertHelper_FromString</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Enum&gt;
<a name="l00438"></a>00438 {
<a name="l00439"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string_3_01_t_00_01qx_1_1cvt_1_1detail_1_bdb5d6b2ead7178c1fcb5e2683c1dad9.html#a1d3bf898204070a9061ed75525214c26">00439</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string.html#aaf28fa5f1137a41ddf42f39d936ca006">fromString</a>(<span class="keyword">const</span> QString &amp; s, T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00440"></a>00440    { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); <span class="keywordtype">bool</span> bOk = <span class="keyword">false</span>; t = <span class="keyword">static_cast&lt;</span>T<span class="keyword">&gt;</span>(<span class="keyword">static_cast&lt;</span><span class="keywordtype">long</span><span class="keyword">&gt;</span>(s.toLongLong(&amp; bOk))); <span class="keywordflow">return</span> bOk; }
<a name="l00441"></a>00441 };
<a name="l00442"></a>00442 
<a name="l00443"></a>00443 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00444"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1_152b33b23a4a11ae5883ed3ac9c3a019e.html">00444</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant.html">QxConvertHelper_ToVariant</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Enum&gt;
<a name="l00445"></a>00445 {
<a name="l00446"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1_152b33b23a4a11ae5883ed3ac9c3a019e.html#a5f4ed693c3616348a55d993dacaf07f1">00446</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QVariant <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant.html#a971edcf918308cf3bab078f36f6096b9">toVariant</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00447"></a>00447    { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); <span class="keywordflow">return</span> QVariant(static_cast&lt;qlonglong&gt;(t)); }
<a name="l00448"></a>00448 };
<a name="l00449"></a>00449 
<a name="l00450"></a>00450 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00451"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1e73b0b209852c34e075562270acebd74.html">00451</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant.html">QxConvertHelper_FromVariant</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Enum&gt;
<a name="l00452"></a>00452 {
<a name="l00453"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant_3_01_t_00_01qx_1_1cvt_1_1detail_1e73b0b209852c34e075562270acebd74.html#a4617f85cb33919b2a285956dc01bfbc6">00453</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant.html#aace1cc67984f43c4893b7bf4f4ac850d">fromVariant</a>(<span class="keyword">const</span> QVariant &amp; v, T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00454"></a>00454    { Q_UNUSED(format); Q_UNUSED(index); Q_UNUSED(ctx); <span class="keywordtype">bool</span> bOk = <span class="keyword">false</span>; t = <span class="keyword">static_cast&lt;</span>T<span class="keyword">&gt;</span>(<span class="keyword">static_cast&lt;</span><span class="keywordtype">long</span><span class="keyword">&gt;</span>(v.toLongLong(&amp; bOk))); <span class="keywordflow">return</span> bOk; }
<a name="l00455"></a>00455 };
<a name="l00456"></a>00456 
<a name="l00457"></a>00457 <span class="preprocessor">#ifndef _QX_NO_JSON</span>
<a name="l00458"></a>00458 <span class="preprocessor"></span>
<a name="l00459"></a>00459 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00460"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1hele6227b13397756512198e0d103271108.html">00460</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json.html">QxConvertHelper_ToJson</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Enum&gt;
<a name="l00461"></a>00461 {
<a name="l00462"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1hele6227b13397756512198e0d103271108.html#a0b9fa03557fa97955cd43967bb2464b2">00462</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QJsonValue <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json.html#a60b3ad86395d7816fba5975e37ae321f">toJson</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format)
<a name="l00463"></a>00463    { Q_UNUSED(format); <span class="keywordflow">return</span> QJsonValue(static_cast&lt;int&gt;(t)); }
<a name="l00464"></a>00464 };
<a name="l00465"></a>00465 
<a name="l00466"></a>00466 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00467"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1ha8a5bca1f08cc72d554ad9f7242bca16.html">00467</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json.html">QxConvertHelper_FromJson</a>&lt;T, qx::cvt::detail::helper::QxConvertHelper_Enum&gt;
<a name="l00468"></a>00468 {
<a name="l00469"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json_3_01_t_00_01qx_1_1cvt_1_1detail_1_1ha8a5bca1f08cc72d554ad9f7242bca16.html#a77cacb1645023eb3d9eddf3b86d3a4c3">00469</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json.html#af9120e24ca37ae8e44a0fae6fd0e1c6a">fromJson</a>(<span class="keyword">const</span> QJsonValue &amp; j, T &amp; t, <span class="keyword">const</span> QString &amp; format)
<a name="l00470"></a>00470    { Q_UNUSED(format); t = <span class="keyword">static_cast&lt;</span>T<span class="keyword">&gt;</span>(<span class="keyword">static_cast&lt;</span><span class="keywordtype">long</span><span class="keyword">&gt;</span>(qRound(j.toDouble()))); <span class="keywordflow">return</span> <a class="code" href="_qx_bool_8h.html#a40069a4245b458585997dadea3a86b33">qx_bool</a>(<span class="keyword">true</span>); }
<a name="l00471"></a>00471 };
<a name="l00472"></a>00472 
<a name="l00473"></a>00473 <span class="preprocessor">#endif // _QX_NO_JSON</span>
<a name="l00474"></a>00474 <span class="preprocessor"></span>
<a name="l00475"></a>00475 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00476"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html">00476</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html">QxConvertHelper</a>
<a name="l00477"></a>00477 {
<a name="l00478"></a>00478 
<a name="l00479"></a>00479 <span class="keyword">private</span>:
<a name="l00480"></a>00480 
<a name="l00481"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#a589222c4f2346f84f5ab7f09471cf8e0">00481</a>    <span class="keyword">typedef</span> <span class="keyword">typename</span> boost::mpl::if_c&lt; boost::is_pointer&lt;T&gt;::value, <a class="code" href="structqx_1_1cvt_1_1detail_1_1helper_1_1_qx_convert_helper___ptr.html">qx::cvt::detail::helper::QxConvertHelper_Ptr</a>, <a class="code" href="structqx_1_1cvt_1_1detail_1_1helper_1_1_qx_convert_helper___generic.html">qx::cvt::detail::helper::QxConvertHelper_Generic</a> &gt;<a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#ac64c5bda4a7d3eb9c474ed361ba3cb6a">::type</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#a589222c4f2346f84f5ab7f09471cf8e0">type_str_cvt_helper_1</a>;
<a name="l00482"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#a36a7ecb04196c345b25f6fbd4718bc32">00482</a>    <span class="keyword">typedef</span> <span class="keyword">typename</span> boost::mpl::if_c&lt; qx::trait::is_smart_ptr&lt;T&gt;::value, <a class="code" href="structqx_1_1cvt_1_1detail_1_1helper_1_1_qx_convert_helper___ptr.html">qx::cvt::detail::helper::QxConvertHelper_Ptr</a>, <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#a589222c4f2346f84f5ab7f09471cf8e0">type_str_cvt_helper_1</a> &gt;<a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#ac64c5bda4a7d3eb9c474ed361ba3cb6a">::type</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#a36a7ecb04196c345b25f6fbd4718bc32">type_str_cvt_helper_2</a>;
<a name="l00483"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#aa4dcc3f0e97e85e9fb05dfa33b16cad2">00483</a>    <span class="keyword">typedef</span> <span class="keyword">typename</span> boost::mpl::if_c&lt; qx::trait::is_container&lt;T&gt;::value, <a class="code" href="structqx_1_1cvt_1_1detail_1_1helper_1_1_qx_convert_helper___container.html">qx::cvt::detail::helper::QxConvertHelper_Container</a>, <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#a36a7ecb04196c345b25f6fbd4718bc32">type_str_cvt_helper_2</a> &gt;<a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#ac64c5bda4a7d3eb9c474ed361ba3cb6a">::type</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#aa4dcc3f0e97e85e9fb05dfa33b16cad2">type_str_cvt_helper_3</a>;
<a name="l00484"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#a2d7a24ef97752a2617fb8e28a9f33560">00484</a>    <span class="keyword">typedef</span> <span class="keyword">typename</span> boost::mpl::if_c&lt; qx::trait::is_qx_registered&lt;T&gt;::value, <a class="code" href="structqx_1_1cvt_1_1detail_1_1helper_1_1_qx_convert_helper___registered.html">qx::cvt::detail::helper::QxConvertHelper_Registered</a>, <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#aa4dcc3f0e97e85e9fb05dfa33b16cad2">type_str_cvt_helper_3</a> &gt;<a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#ac64c5bda4a7d3eb9c474ed361ba3cb6a">::type</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#a2d7a24ef97752a2617fb8e28a9f33560">type_str_cvt_helper_4</a>;
<a name="l00485"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#a5b0ae80ed75ddeb1d7da4254f221b9fb">00485</a>    <span class="keyword">typedef</span> <span class="keyword">typename</span> boost::mpl::if_c&lt; boost::is_enum&lt;T&gt;::value, <a class="code" href="structqx_1_1cvt_1_1detail_1_1helper_1_1_qx_convert_helper___enum.html">qx::cvt::detail::helper::QxConvertHelper_Enum</a>, <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#a2d7a24ef97752a2617fb8e28a9f33560">type_str_cvt_helper_4</a> &gt;<a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#ac64c5bda4a7d3eb9c474ed361ba3cb6a">::type</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#a5b0ae80ed75ddeb1d7da4254f221b9fb">type_str_cvt_helper_5</a>;
<a name="l00486"></a>00486 
<a name="l00487"></a>00487 <span class="keyword">public</span>:
<a name="l00488"></a>00488 
<a name="l00489"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#ac64c5bda4a7d3eb9c474ed361ba3cb6a">00489</a>    <span class="keyword">typedef</span> <span class="keyword">typename</span> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#a5b0ae80ed75ddeb1d7da4254f221b9fb">QxConvertHelper&lt;T&gt;::type_str_cvt_helper_5</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper.html#ac64c5bda4a7d3eb9c474ed361ba3cb6a">type</a>;
<a name="l00490"></a>00490 
<a name="l00491"></a>00491 };
<a name="l00492"></a>00492 
<a name="l00493"></a>00493 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00494"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___to_string.html">00494</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___to_string.html">QxConvert_ToString</a>
<a name="l00495"></a>00495 {
<a name="l00496"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___to_string.html#a03383b220545ee23e3a61be353a8214e">00496</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QString <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___to_string.html#a03383b220545ee23e3a61be353a8214e">toString</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00497"></a>00497    { <span class="keywordflow">return</span> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_string.html">qx::cvt::detail::QxConvertHelper_ToString&lt;T, typename qx::cvt::detail::QxConvertHelper&lt;T&gt;::type</a>&gt;<a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___to_string.html#a03383b220545ee23e3a61be353a8214e">::toString</a>(t, format, index, ctx); }
<a name="l00498"></a>00498 };
<a name="l00499"></a>00499 
<a name="l00500"></a>00500 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00501"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___from_string.html">00501</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___from_string.html">QxConvert_FromString</a>
<a name="l00502"></a>00502 {
<a name="l00503"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___from_string.html#a5af5858e017f39422c1f82b866e491be">00503</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___from_string.html#a5af5858e017f39422c1f82b866e491be">fromString</a>(<span class="keyword">const</span> QString &amp; s, T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00504"></a>00504    { <span class="keywordflow">return</span> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_string.html">qx::cvt::detail::QxConvertHelper_FromString&lt;T, typename qx::cvt::detail::QxConvertHelper&lt;T&gt;::type</a>&gt;<a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___from_string.html#a5af5858e017f39422c1f82b866e491be">::fromString</a>(s, t, format, index, ctx); }
<a name="l00505"></a>00505 };
<a name="l00506"></a>00506 
<a name="l00507"></a>00507 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00508"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___to_variant.html">00508</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___to_variant.html">QxConvert_ToVariant</a>
<a name="l00509"></a>00509 {
<a name="l00510"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___to_variant.html#a7dc58c07e52a074adc11fe3f5c524b7d">00510</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QVariant <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___to_variant.html#a7dc58c07e52a074adc11fe3f5c524b7d">toVariant</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00511"></a>00511    { <span class="keywordflow">return</span> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_variant.html">qx::cvt::detail::QxConvertHelper_ToVariant&lt;T, typename qx::cvt::detail::QxConvertHelper&lt;T&gt;::type</a>&gt;<a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___to_variant.html#a7dc58c07e52a074adc11fe3f5c524b7d">::toVariant</a>(t, format, index, ctx); }
<a name="l00512"></a>00512 };
<a name="l00513"></a>00513 
<a name="l00514"></a>00514 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00515"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___from_variant.html">00515</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___from_variant.html">QxConvert_FromVariant</a>
<a name="l00516"></a>00516 {
<a name="l00517"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___from_variant.html#aac7525187ed6131c7895a5a83e7105a8">00517</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___from_variant.html#aac7525187ed6131c7895a5a83e7105a8">fromVariant</a>(<span class="keyword">const</span> QVariant &amp; v, T &amp; t, <span class="keyword">const</span> QString &amp; format, <span class="keywordtype">int</span> index, <a class="code" href="structqx_1_1cvt_1_1context.html#ade79c85929462745a3adcdf310c91a93">qx::cvt::context::ctx_type</a> ctx)
<a name="l00518"></a>00518    { <span class="keywordflow">return</span> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_variant.html">qx::cvt::detail::QxConvertHelper_FromVariant&lt;T, typename qx::cvt::detail::QxConvertHelper&lt;T&gt;::type</a>&gt;<a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___from_variant.html#aac7525187ed6131c7895a5a83e7105a8">::fromVariant</a>(v, t, format, index, ctx); }
<a name="l00519"></a>00519 };
<a name="l00520"></a>00520 
<a name="l00521"></a>00521 <span class="preprocessor">#ifndef _QX_NO_JSON</span>
<a name="l00522"></a>00522 <span class="preprocessor"></span>
<a name="l00523"></a>00523 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00524"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___to_json.html">00524</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___to_json.html">QxConvert_ToJson</a>
<a name="l00525"></a>00525 {
<a name="l00526"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___to_json.html#a6b7e72ff94fe70467004c3562f85dce5">00526</a>    <span class="keyword">static</span> <span class="keyword">inline</span> QJsonValue <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___to_json.html#a6b7e72ff94fe70467004c3562f85dce5">toJson</a>(<span class="keyword">const</span> T &amp; t, <span class="keyword">const</span> QString &amp; format)
<a name="l00527"></a>00527    { <span class="keywordflow">return</span> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___to_json.html">qx::cvt::detail::QxConvertHelper_ToJson&lt;T, typename qx::cvt::detail::QxConvertHelper&lt;T&gt;::type</a>&gt;<a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___to_json.html#a6b7e72ff94fe70467004c3562f85dce5">::toJson</a>(t, format); }
<a name="l00528"></a>00528 };
<a name="l00529"></a>00529 
<a name="l00530"></a>00530 <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00531"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___from_json.html">00531</a> <span class="keyword">struct </span><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___from_json.html">QxConvert_FromJson</a>
<a name="l00532"></a>00532 {
<a name="l00533"></a><a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___from_json.html#a797e8cdff96e983b2668c77e7e509d6e">00533</a>    <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classqx_1_1_qx_bool.html" title="qx_bool : boolean type with code and description message when an error occured">qx_bool</a> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___from_json.html#a797e8cdff96e983b2668c77e7e509d6e">fromJson</a>(<span class="keyword">const</span> QJsonValue &amp; j, T &amp; t, <span class="keyword">const</span> QString &amp; format)
<a name="l00534"></a>00534    { <span class="keywordflow">return</span> <a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert_helper___from_json.html">qx::cvt::detail::QxConvertHelper_FromJson&lt;T, typename qx::cvt::detail::QxConvertHelper&lt;T&gt;::type</a>&gt;<a class="code" href="structqx_1_1cvt_1_1detail_1_1_qx_convert___from_json.html#a797e8cdff96e983b2668c77e7e509d6e">::fromJson</a>(j, t, format); }
<a name="l00535"></a>00535 };
<a name="l00536"></a>00536 
<a name="l00537"></a>00537 <span class="preprocessor">#endif // _QX_NO_JSON</span>
<a name="l00538"></a>00538 <span class="preprocessor"></span>
<a name="l00539"></a>00539 } <span class="comment">// namespace detail</span>
<a name="l00540"></a>00540 } <span class="comment">// namespace cvt</span>
<a name="l00541"></a>00541 } <span class="comment">// namespace qx</span>
<a name="l00542"></a>00542 
<a name="l00543"></a>00543 <span class="preprocessor">#include &quot;../../inl/QxConvert/QxConvert_WithIndex.inl&quot;</span>
<a name="l00544"></a>00544 <span class="preprocessor">#include &quot;../../inl/QxConvert/QxConvert_ToString.inl&quot;</span>
<a name="l00545"></a>00545 <span class="preprocessor">#include &quot;../../inl/QxConvert/QxConvert_FromString.inl&quot;</span>
<a name="l00546"></a>00546 <span class="preprocessor">#include &quot;../../inl/QxConvert/QxConvert_ToVariant.inl&quot;</span>
<a name="l00547"></a>00547 <span class="preprocessor">#include &quot;../../inl/QxConvert/QxConvert_FromVariant.inl&quot;</span>
<a name="l00548"></a>00548 <span class="preprocessor">#include &quot;../../inl/QxConvert/QxConvert_ToJson.inl&quot;</span>
<a name="l00549"></a>00549 <span class="preprocessor">#include &quot;../../inl/QxConvert/QxConvert_FromJson.inl&quot;</span>
<a name="l00550"></a>00550 <span class="preprocessor">#include &quot;../../inl/QxConvert/QxConvert_Qt.inl&quot;</span>
<a name="l00551"></a>00551 
<a name="l00552"></a>00552 <span class="preprocessor">#endif // _QX_CONVERT_IMPL_H_</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="_qx_convert___impl_8h.html">QxConvert_Impl.h</a>      </li>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Defines</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


    <li class="footer">Generated on Sun Dec 11 2016 13:41:03 for QxOrm by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.5.1 </li>
   </ul>
 </div>


</body>
</html>
